/*
 * @Description:
 * @Author:
 * @Date: 2024-10-26 11:11:33
 * @LastEditTime: 2024-12-22 22:18:08
 * @LastEditors: XXX
 */
import { getSidebarStatus, getSize } from "@/utils/cookies"
import { getLocale } from '@/locales'

export enum DeviceType {
  Mobile,
  Desktop
}

export interface AppState {
  device: DeviceType,
  sidebar: {
    opened: boolean,
    withoutAnimation: boolean
  },
  language: string,
  size: string
}

export const state: AppState = {
  sidebar: {
    opened: getSidebarStatus() !== 'closed',
    withoutAnimation: false
  },
  language: getLocale(),
  device: DeviceType.Desktop,
  size: getSize() || 'medium'
}
